-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[CIR][NFC] Fix build problem inside an assert #169715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A recent change introduced a failure in debug builds due to an incorrect level of indirection inside an assert. This fixes that.
|
@llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) ChangesA recent change introduced a failure in debug builds due to an incorrect level of indirection inside an assert. This fixes that. Full diff: https://github.com/llvm/llvm-project/pull/169715.diff 1 Files Affected:
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
index 5150a1682f712..22128ed3521f8 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
@@ -1142,7 +1142,7 @@ CIRGenFunction::VlaSizePair
CIRGenFunction::getVLAElements1D(const VariableArrayType *vla) {
mlir::Value vlaSize = vlaSizeMap[vla->getSizeExpr()];
assert(vlaSize && "no size for VLA!");
- assert(vlaSize->getType() == sizeTy);
+ assert(vlaSize.getType() == sizeTy);
return {vlaSize, vla->getElementType()};
}
|
|
@llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) ChangesA recent change introduced a failure in debug builds due to an incorrect level of indirection inside an assert. This fixes that. Full diff: https://github.com/llvm/llvm-project/pull/169715.diff 1 Files Affected:
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
index 5150a1682f712..22128ed3521f8 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
@@ -1142,7 +1142,7 @@ CIRGenFunction::VlaSizePair
CIRGenFunction::getVLAElements1D(const VariableArrayType *vla) {
mlir::Value vlaSize = vlaSizeMap[vla->getSizeExpr()];
assert(vlaSize && "no size for VLA!");
- assert(vlaSize->getType() == sizeTy);
+ assert(vlaSize.getType() == sizeTy);
return {vlaSize, vla->getElementType()};
}
|
AmrDeveloper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks
A recent change introduced a failure in debug builds due to an incorrect level of indirection inside an assert. This fixes that.
A recent change introduced a failure in debug builds due to an incorrect level of indirection inside an assert. This fixes that.
A recent change introduced a failure in debug builds due to an incorrect level of indirection inside an assert. This fixes that.